import { MoreConcisePage } from '@/core';

// 主函数
(function () {
  const selectors = [
    '.recommended-swipe',
    '.bili-header__channel',
    '.bili-video-card.is-rcmd:not(.enable-no-interest)',
    '.floor-single-card',
    '.bili-live-card',
    '.header-channel',
    '.fixed-card',
    '.palette-button-adcard',
    '#slide_ad'
  ];

  const css = `
  ${selectors.join(',')} {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    z-index: -9999 !important;
  }
  
  /* 视频列表顶部边距 */
  .bili-header__banner {
    margin-bottom: 40px !important;
  }
  
  /* 图片横幅底部白色渐变 */
  .bili-header__banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: 1;
    pointer-events: none;
  }
  
  @media (max-width: 1139.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(5) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1140px) and (max-width: 1299.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(5) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1140px) and (max-width: 1299.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(n + 6) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1300px) and (max-width: 1399.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(5) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1300px) and (max-width: 1399.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(n + 6) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1400px) and (max-width: 1559.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(6) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1400px) and (max-width: 1559.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(7) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1560px) and (max-width: 2059.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(6) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 1560px) and (max-width: 2059.9px) {
    .recommended-container_floor-aside .container>*:nth-of-type(7) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 2060px) {
    .recommended-container_floor-aside .container>*:nth-of-type(6) {
      margin-top: 24px !important;
    }
  }
  
  @media (min-width: 2060px) {
    .recommended-container_floor-aside .container>*:nth-of-type(7) {
      margin-top: 24px !important;
    }
  }
  
  .recommended-container_floor-aside .container>*:nth-of-type(6),
  .recommended-container_floor-aside .container>*:nth-of-type(7),
  .recommended-container_floor-aside .container>*:nth-of-type(n + 8),
  .recommended-container_floor-aside .container.is-version8>*:nth-of-type(n + 13),
  .recommended-container_floor-aside .container .floor-single-card:first-of-type,
  .recommended-container_floor-aside .container .load-more-anchor .floor-single-card {
    margin-top: 24px !important;
  }
  `;

  const log = true;

  new MoreConcisePage({
    name: 'More Concise Page',
    selectors,
    css,
    log,
  });
})();